package com.dsg.service.apply;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dsg.entity.apply.DsgApplyBill;
import com.dsg.entity.apply.DsgApplyCar;
import com.dsg.entity.dto.RejectCarDto;
import com.dsg.entity.dto.ReturnCardRecordDto;

import java.util.List;

/**
 * <p>
 * 車輛資料 服务类
 * </p>
 *
 * @author system
 * @since 2020-07-04
 */
public interface IDsgApplyCarService extends IService<DsgApplyCar>, IDsglService<DsgApplyCar> {
    Page<RejectCarDto> selectRejectCar(Page<RejectCarDto> page, DsgApplyCar en);

    List<DsgApplyCar> selectCar(String cusNo);

    void removeAddress(String carOid);

    /**
     * 審批所有車
     * @param bill
     * @return
     * @throws Exception
     */
    boolean carAuditAll(DsgApplyBill bill) throws Exception;

    boolean rebornCarAudi(DsgApplyBill bill, List<DsgApplyCar> carList) throws Exception;

    /**
     * 審批一輛車
     * @param bill
     * @param car
     * @return
     * @throws Exception
     */
    boolean audit(DsgApplyBill bill, DsgApplyCar car) throws Exception;
    
    List<DsgApplyCar> selectCarListByBill(String appNo);

    int deleteCarAndOther(String oid);

    DsgApplyCar detail(String id);

    /**
     * 查询车辆与油咭资料
     *
     * @param dsgApplyCar
     * @return
     */
    List<DsgApplyCar> selectDsgApplyCarAndCard(DsgApplyCar dsgApplyCar);

    /**
     * Check車牌列表（分页）
     * @param page
     * @param dsgApplyCar
     * @return
     */
    Page<DsgApplyCar> selectDsgApplyCarList(Page<DsgApplyCar> page, DsgApplyCar dsgApplyCar);

    /**
     * Check車牌列表（分页）
     *
     * @param dsgApplyCar
     * @return
     */
    List<DsgApplyCar> selectDsgApplyCarList(DsgApplyCar dsgApplyCar);

    /**
     * 返咭記錄列表（分页）
     * @param page
     * @param returnCardRecordDto
     * @return
     */
    Page<ReturnCardRecordDto> selectReturnCardList(Page<ReturnCardRecordDto> page, ReturnCardRecordDto returnCardRecordDto);


}
